package stringslice

import "gopl/ch7/track"

type CustomSort1 struct {
	T      []*track.Track
	Less1  func(x, y *track.Track) bool
	Fields []string
}

func (x CustomSort1) Len() int           { return len(x.T) }
func (x CustomSort1) Less(i, j int) bool { return x.Less1(x.T[i], x.T[j]) }
func (x CustomSort1) Swap(i, j int)      { x.T[i], x.T[j] = x.T[j], x.T[i] }
